cmake_minimum_required(VERSION 3.22 FATAL_ERROR)

project(pjt7 LANGUAGES C CXX)

add_executable(pjt7 src/main.cpp)

# 安装可执行文件
install(PROGRAMS ${PROJECT_BINARY_DIR}/pjt7 DESTINATION bin)
# 安装目标
install(TARGETS pjt7 DESTINATION bin)
# 安装普通文件
install(FILES pjt7.cfg DESTINATION cfg)
# 安装整个目录
install(DIRECTORY runtime DESTINATION share)

#其他
# INSTALL(TARGETS myrun mylib mystaticlib
#        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}    #运行时库
#        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}    #动态库
#        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}    #静态库 
# )